//
//  Height.m
//  UI_中期作业_豆瓣
//
//  Created by 15 on 15/6/26.
//  Copyright (c) 2015年 dllo. All rights reserved.
//

#import "HeightCount.h"

@implementation HeightCount

+ (CGFloat)heightWithText:(NSString *)text font:(NSInteger)font wide:(NSInteger)wide
{
    NSDictionary *dic = @{NSFontAttributeName: [UIFont systemFontOfSize:font]};
    CGSize size = CGSizeMake(wide, 2000);
    CGRect rect = [text boundingRectWithSize:size options:NSStringDrawingUsesLineFragmentOrigin attributes:dic context:nil];

    return rect.size.height;
}

@end
